/*
 * @Author: DaTree
 * @Date: 2020-11-16 10:50:51
 * @LastEditTime: 2020-11-19 22:38:45
 * @LastEditors: DaTree
 * @Description: DaTreeEdit
 * @FilePath: \services\src\controller\response.js
 * @天将降大任于是人也，必先苦其心志，劳其筋骨，饿其体肤，空乏其身，行拂乱其所为。 ——《孟子•告子下》
 * @symbol_custom_string_obkoro1_copyright: Copyright ${now_year} DaTree
 */
// export default class Response {
//   data: any
//   code: string
//   message: string
//   constructor(data: any, code = '000000', message = '') {
//     this.data = data
//     this.code = code
//     this.message = message
//   }
// }

export default class Response {
  constructor(data, code = '000000', message = '', success = true) {
    this.data = data
    this.code = code
    this.message = message
    this.success = success
  }
}
export class FailResponse{
  constructor(data, message='') {
    this.data = data
    this.code = '111111'
    this.message = message
    this.success = false
  }
}